class CreateUsers < ActiveRecord::Migration
  def self.up
    create_table "users" do |t|
      t.string :email, :name,              :null => false
      t.string :crypted_password,          :limit => 40
      t.string :password_reset_code,       :limit => 40
      t.string :salt,                      :limit => 40
      t.datetime :created_at, :deleted_at, :activated_at
      t.datetime :updated_at, :remember_token_expires_at
      t.string :remember_token,            :default => ''
      t.string :activation_code,           :limit => 40
      t.string :state, :null => :no, :default => 'passive'
    end
    
    execute "INSERT INTO users (email, name, crypted_password, salt, state) VALUES ('admin@ea.com', 'admin', '01438327bf5262d6c27709380960b51bd9d7c9d1', '01139a1a619a608028745e936639528f3b584057', 'active')"
    execute "INSERT INTO users (email, name, crypted_password, salt, state) VALUES ('sherezadeguerrero@yahoo.com', 'Sherezade Guerrero', '01438327bf5262d6c27709380960b51bd9d7c9d1', '01139a1a619a608028745e936639528f3b584057', 'active')"
    execute "INSERT INTO users (email, name, crypted_password, salt, state) VALUES ('blackgb@mindspring.com', 'Len Black', '01438327bf5262d6c27709380960b51bd9d7c9d1', '01139a1a619a608028745e936639528f3b584057', 'active')"
    execute "INSERT INTO users (email, name, crypted_password, salt, state) VALUES ('saltillo@ea.com', 'Saltillo Admin', '01438327bf5262d6c27709380960b51bd9d7c9d1', '01139a1a619a608028745e936639528f3b584057', 'active')"
  end
  
  def self.down
    drop_table "users"
  end
end
